package at.ltasat.train.set;

import at.ltasat.ArgumentClazzData;
import at.ltasat.classifier.Classifier;
import at.ltasat.classifier.ClazzManager;
import at.ltasat.classifier.Membership;
import at.ltasat.classifier.ObjectFeatures;
import at.ltasat.classifier.ObjectFeaturesFactory;
import at.ltasat.classifier.Trainer;

final class ManualTrainer extends Trainer<byte[], ArgumentClazzData> {

	private final int nIterations;
	private final long maxTime;

	public ManualTrainer(String name, ClazzManager<ArgumentClazzData> classManager, ObjectFeaturesFactory<byte[]> factory, int nIterations, long maxTime) {
		super(name, classManager, factory);
		this.nIterations = nIterations;
		this.maxTime = maxTime;
	}

	@Override
	public void train(ObjectFeatures features, Membership<ArgumentClazzData>... memberships) {
		// nothing to do
	}

	@Override
	public Classifier<byte[], ArgumentClazzData> create() {
		return new ManualClassifier(getName(), getClazzManager(), getObjectFeaturesFactory(), nIterations, maxTime);
	}

}
